# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=inguma
pkgver=0.1.1
pkgrel=10
pkgdesc='A free penetration testing and vulnerability discovery toolkit entirely written in python. Framework includes modules to discover hosts, gather information about, fuzz targets, brute force usernames and passwords, exploits, and a disassembler.'
arch=('any')
groups=('blackarch' 'blackarch-cracker' 'blackarch-disassembler'
        'blackarch-exploitation' 'blackarch-fuzzer' 'blackarch-scanner')
url='http://inguma.sourceforge.net'
license=('GPL')
depends=('python2' 'python2-paramiko' 'python2-pyqt')
optdepends=('python2-cx_oracle: Access to Oracle databases'
            'python2-pysnmp: SNMP support'
            'pyqt3: GUI')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('0d732e0e5d288f950efd33da817bf1a0bd4fe7faf45ecadec69e17842bdad3af58fcfb948136931045d1aaff8f74f3951eeb5a19ed70cb4baf1ae587b84eda6d')

package() {
  cd $pkgnmae

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" AUTHORS BUGS ChangeLog \
    TODO THANKS REQUIRES README MODULES.txt TUTORIAL.txt
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  rm AUTHORS BUGS ChangeLog TODO THANKS REQUIRES README MODULES.txt \
    TUTORIAL.txt LICENSE COPYING.txt

  cp --no-preserve=ownership -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec python2 $pkgname.py
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

